﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MVCBugTracker.Models
{
    public interface IBugRepository
    {
        //Bugs
        IQueryable<Bug> GetBugsByProject(int projectID);
        IQueryable<Bug> GetMyBugs(string userName);
        IQueryable<Bug> GetBugsByCategory(int projectID, int categoryID);
        IQueryable<Bug> GetBugsByMilestone(int projectID, int milestoneID);
        IQueryable<Bug> GetBugsByPriority(int projectID, int priorityID);
        IQueryable<Bug> GetBugsByStatus(int projectID, int statusID);
        Bug GetBug(int bugID);
        void AddBug(Bug bug);
        void DeleteBug(Bug bug);

        void Save();

        //Comments
        IQueryable<BugComment> GetBugComments(int bugID);
        BugComment GetBugComment(int commentID);
        void AddBugComment(BugComment comment);
        void DeleteBugComment(BugComment comment);

        //History
        IQueryable<BugHistory> GetBugHistories(int bugID);
        BugHistory GetBugHistory(int historyID);
        void AddBugHistory(BugHistory history);
        void DeleteBugHistory(BugHistory history);

        //Notifications
        IQueryable<BugNotification> GetBugNotifications(int bugID);
        BugNotification GetBugNotification(int notificationID);
        void AddBugNotification(BugNotification notification);
        void DeleteBugNotification(BugNotification notification);

        //Attachments
        IQueryable<BugAttachment> GetBugAttachments(int bugID);
        BugAttachment GetBugAttachment(int attachmentID);
        void AddBugAttachment(BugAttachment attachment);
        void DeleteBugAttachment(BugAttachment attachment);
    }
}
